package com.iot.service;

import com.iot.mapper.DTareaMapper;
import com.iot.mapper.TareaMapper;
import com.iot.pojo.MTarea;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TareaServiceImpl implements TareaService {
    @Autowired
    private TareaMapper mapper;
    @Autowired
    private DTareaMapper dmapper;
    @Override
    public int getRecordCount(String sWhere)
    {
        return mapper.getRecordCount(sWhere);
    }

    @Override
    public int insert(MTarea mTarea) {
        return mapper.insert(mTarea);
    }

    @Override
    public void update(MTarea mTarea) {
         mapper.update(mTarea);
    }

    @Override
    public void deleteById(int id) {
        mapper.deleteById(id);
    }

    @Override
    public MTarea single(Integer id) {
        return mapper.single(id);
    }

    @Override
    public List<MTarea> fetch(String sWhere) {
        return mapper.fetch(sWhere);
    }

    @Override
    public List<MTarea> fetchByPage(Map<String, Object> map) {

        return dmapper.fetchByPage(map);
    }


}
